/**
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-08 15:07:43
 * Copyright (c) 2015- joysuch-版权所有
 */
package com.joysuch.wwyt.bp.repository;

import com.joysuch.wwyt.bp.entity.contractor.BpContractorEvaluation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;


/**
 * 承包商评定
 */
public interface BpContractorEvaluationDao extends JpaRepository<BpContractorEvaluation, Long>, JpaSpecificationExecutor<BpContractorEvaluation> {

    @Query(value = "select * from wwyt_bp_contractor_evaluation where contractor_id=?1 and delete_flag='0' order by inspection_date desc limit 1",nativeQuery = true)
    BpContractorEvaluation findBycAndContractorId(Long contractorId);
}
